home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Oberon
/
source
/
amiga
/
Timer.mod
< prev
next >
Wrap
Text File
|
1995-06-29
|
2KB
|
103 lines
(**************************************************************************
$RCSfile: Timer.mod $
Description: Interface to timer.device
Created by: fjc (Frank Copeland)
$Revision: 3.8 $
$Author: fjc $
$Date: 1995/06/04 23:13:14 $
Includes Release 40.15
(C) Copyright 1985-1993 Commodore-Amiga, Inc.
All Rights Reserved
Oberon-A interface Copyright © 1994-1995, Frank Copeland.
This file is part of the Oberon-A Interface.
See Oberon-A.doc for conditions of use and distribution.
***************************************************************************)
<* STANDARD- *>
MODULE [2] Timer;
IMPORT e := Exec;
(*
** $VER: timer.h 36.16 (25.1.91)
**
** Timer device name and useful definitions.
*)
CONST
(* unit defintions *)
microHZ * = 0;
vBlank * = 1;
eClock * = 2;
waitUntil * = 3;
waitEClock* = 4;
timerName * = "timer.device";
TYPE
TimeValPtr* = POINTER TO TimeVal;
TimeVal* = RECORD
secs* : e.ULONG;
micro* : e.ULONG;
END; (* TimeVal *)
EClockValPtr* = POINTER TO EClockVal;
EClockVal* = RECORD
hi* : e.ULONG;
lo* : e.ULONG;
END; (* EClockVal *)
TimeRequestPtr* = POINTER TO TimeRequest;
TimeRequest* = RECORD (e.IORequestBase)
node* : e.IORequest;
time* : TimeVal;
END; (* TimeRequest *)
CONST
(* ioCommand to use for adding a timer *)
addRequest * = e.nonstd;
getSysTime * = e.nonstd+1;
setSysTime * = e.nonstd+2;
(*-- Device base variable----------------------------------------------*)
VAR
base * : e.DevicePtr;
(*-- Device functions -------------------------------------------------*)
(*
** $VER: timer_protos.h 1.6 (25.1.91)
*)
PROCEDURE AddTime* [base,-42]
( VAR dest [8] : TimeVal;
VAR src [9] : TimeVal );
PROCEDURE SubTime* [base,-48]
( VAR dest [8] : TimeVal;
VAR src [9] : TimeVal );
PROCEDURE CmpTime* [base,-54]
( VAR dest [8] : TimeVal;
VAR src [9] : TimeVal )
: INTEGER;
PROCEDURE ReadEClock* [base,-60]
( VAR dest [8] : EClockVal )
: e.ULONG;
PROCEDURE GetSysTime* [base,-66]
( VAR dest [8] : TimeVal );
BEGIN base := NIL
END Timer.